declare @Key nvarchar(100)
declare @Value nvarchar(max)

set @Key='WebsiteDomain'
set @Value=N'local.1st-canvas.com'
if not exists(select 1 from [setting] where [key]=@key)
begin
	insert into [setting](
		[key],
		[Value]
	)
	values(
		@key,
		@value
	)
end
else
begin
	update [setting]
	set
		[Value]=@value,
		update_date=getdate()
	where 
		[key]=@key
end

set @Key='HandleWwwSubdomain'
set @Value=N'false'
if not exists(select 1 from [setting] where [key]=@key)
begin
	insert into [setting](
		[key],
		[Value]
	)
	values(
		@key,
		@value
	)
end
else
begin
	update [setting]
	set
		[Value]=@value,
		update_date=getdate()
	where 
		[key]=@key
end